using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using SmallJob.Model;

namespace SmallJob.Data
{
    public class SmallJobDB: DbContext
    {
        
        public SmallJobDB(string connectionString)
            : base(connectionString){}
        public IDbSet<Category> Categories { get; set; }
        public IDbSet<Offer> Offers { get; set; }
        public IDbSet<Provide> Provides { get; set; }
        public IDbSet<ProvideComment> ProvideComments { get; set; }
        public IDbSet<Request> Requests { get; set; }
        public IDbSet<RequestComment> RequestComments { get; set; }
        public IDbSet<User> Users { get; set; }
        public IDbSet<Order> Orders { get; set; }
        public IDbSet<OfferMessage> OfferMessages { get; set; }
        public IDbSet<Skill> Skills { set; get; }
        public IDbSet<City> Cities { set; get; }
        public IDbSet<Manager> Managers { set; get; }
        public IDbSet<Banner> Banners { get; set; }
        public IDbSet<Message> Messages { get; set; }
        public IDbSet<Feature> Features { get; set; }
        public IDbSet<FeatureItem> FeatureItems { get; set; }
        public IDbSet<EmailFormat> EmailFormats { get; set; }
        public IDbSet<Follower> Followers { get; set; }
        public IDbSet<Transaction> Transactions { get; set; }
        public IDbSet<BidRequest> BidRequests { get; set; }
        public IDbSet<SmsLog> SmsLogs { get; set; }

        public virtual IDbSet<T> DbSet<T>() where T : class
        {
            return Set<T>();
        }

        public virtual void Commit()
        {
            base.SaveChanges();
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
        }
    }
}
